<?

$d = component_data($c); 
$s = component_settings($c);

//debug($d);
//debug($s);

?><channel><?

	?><title><?=h(strip_tags($s['caption']))?></title><?
	?><link>http<?=$_SERVER['HTTPS'] ? 's' : ''?>://<?=$_SERVER['HTTP_HOST']?>/</link><?
	?><description><?=h(strip_tags($s['caption']))?></description><?
	?><language><?=context('lang')?></language><?
	
	if ($copy = config('copyright')) { ?><copyright><?=$copy?></copyright><? }
	
	?><generator>SbSE v<?=ENGINE_VERSION?></generator><?
	?><ttl>60</ttl><?

	foreach($d = component_data($c) as $id => $v) {

		?><item><?
		
			?><title><?=h(strip_tags($v['title']))?></title><?
			?><link>http<?=($_SERVER['HTTPS'] ? 's' : '').'://'.$_SERVER['HTTP_HOST']."$s[base]$id/"?></link><?
			?><description><?=h(strip_tags($v['anons']))?></description><?
		
		?></item><?
	} 

?></channel>